home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / amos / AMOSList_0197.lzh / AMOSLIST / 000038_amos-request@svcs1.digex.net_Thu Jan 9 18:45:34 1997.msg < prev    next >
Internet Message Format  |  1997-02-02  |  3KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  2.           by mail2.access.digex.net (8.8.4/8.8.4) with ESMTP
  3.       id SAA00234 for <mcox@access.digex.net>; Thu, 9 Jan 1997 18:45:33 -0500 (EST)
  4. Received: (from daemon@localhost)
  5.           by svcs1.digex.net (8.8.4/8.8.4)
  6.       id OAA12413 for amos-out; Thu, 9 Jan 1997 14:40:17 -0500 (EST)
  7. Received: from mail2.access.digex.net (mail2.access.digex.net [205.197.247.3])
  8.           by svcs1.digex.net (8.8.4/8.8.4) with ESMTP
  9.       id OAA12410 for <amos-list@svcs1.digex.net>; Thu, 9 Jan 1997 14:40:16 -0500 (EST)
  10. Received: from lily.csv.warwick.ac.uk (root@lily.csv.warwick.ac.uk [137.205.192.7])
  11.           by mail2.access.digex.net (8.8.4/8.8.4) with ESMTP
  12.       id OAA10073 for <amos-list@access.digex.net>; Thu, 9 Jan 1997 14:40:15 -0500 (EST)
  13. Received: from lily by lily.csv.warwick.ac.uk with SMTP
  14.     id TAA03302; Thu, 9 Jan 1997 19:40:06 GMT
  15. Sender: csuaw@csv.warwick.ac.uk
  16. Message-ID: <32D54990.52A3@warwick.ac.uk>
  17. Date: Thu, 09 Jan 1997 19:40:00 +0000
  18. From: James Daniels <J.R.Daniels@csv.warwick.ac.uk>
  19. Organization: The University of Warwick
  20. X-Mailer: Mozilla 3.01 (X11; I; SunOS 5.5.1 sun4m)
  21. MIME-Version: 1.0
  22. To: AMOS mailing list <amos-list@access.digex.net>
  23. Subject: Re: Not Sorted On Sorting :(
  24. References: <8025641A:0054DF30.00@cms-notes-a.salford.ac.uk>
  25. Content-Type: text/plain; charset=us-ascii
  26. Content-Transfer-Encoding: 7bit
  27. Status: RO
  28. X-Status: 
  29.  
  30. Lee S Howarth wrote:
  31. >   A few days ago I got hold of a utility that converts Imagine objects to
  32. >   another binary format giving easier access to all the points and faces. I
  33. >   wrote the 3d routine in AMOS and used the binary data to draw the objects
  34. >   and faces, my problem with it now is hidden face ellimination on inconvex
  35. >   objects... Doing it on the convex objects is quite easy so i can have
  36. >   spheres, cubes etc but when I use toruses and irregular objects like
  37. >   models of the Enterprise(!) the faces obviosly get muddled(I use only the
  38. >   most technical jargon ;)   So... does anybody know how to solve this
  39. >   nasty problem, any help would be MUCH appreciated.
  40. >   Oh, almost forgot, the faces are in clockwise order when they are saved
  41.  
  42. I guess from your 'subject' heading that you already know this, but all
  43. you have to do is work out the distance of all the faces from you (the
  44. camera). You can do this by adding up Z values. Then all you have to do
  45. is sort these numbers (a simple bubble sort will do for starters) so
  46. that the largest (furthest away) come first. You then draw each of the
  47. faces in the order they are now stored in the sorted list. Easy. The
  48. only problem is speed; the AMOS polygon routine just isn't fast enough;
  49. unless, of course, you're not going for a real-time routine. Still, best
  50. of luck...
  51. -- 
  52.   /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  53.  /James Daniels    Email: J.R.Daniels@warwick.ac.uk \
  54. /(Apex Designs) WWW: http://www.warwick.ac.uk/~csuaw \
  55. \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/